#!/bin/bash -x
PACKAGE_ROOT=kcbomberman

scons -c
scons

rm -rf $PACKAGE_ROOT
mkdir -p $PACKAGE_ROOT/usr/share/java
mkdir -p $PACKAGE_ROOT/usr/bin
#mkdir -p $PACKAGE_ROOT/etc/xsonews
cp -r DEBIAN $PACKAGE_ROOT/
cp helpers/kcbomberman $PACKAGE_ROOT/usr/bin/kcbomberman
cp helpers/kcbomberman-server $PACKAGE_ROOT/usr/bin/kcbomberman-server
#cp helpers/sonews.conf.sample $PACKAGE_ROOT/etc/sonews/sonews.conf
jar -uf kcbomberman.jar resource/
cp kcbomberman.jar $PACKAGE_ROOT/usr/share/java/
dpkg-deb --build $PACKAGE_ROOT 
